package com.ruoyi.forum.dao;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.forum.domain.CircleBlacklist;
import com.ruoyi.forum.mapper.CircleBlacklistMapper;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @Description:论坛小黑屋(CircleBlacklist)表数据库访问层
 * @Author: hoda
 * @Date: Create in 2019-09-04
 * @Modified By:
 * @Modified Date:
 */
@Repository
public class CircleBlacklistDao extends ServiceImpl<CircleBlacklistMapper, CircleBlacklist> {

    @Resource
    private CircleBlacklistMapper circleBlacklistMapper;

    /**
     * 释放到期得小黑屋用户
     */
    @Transactional(rollbackFor = Exception.class)
    public void releaseExpiredUser() {
        circleBlacklistMapper.releaseExpiredUser();
    }
}